<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test</title>
    <script src="https://static.runoob.com/assets/jquery/2.0.3/jquery.min.js"></script>
</head>
<body>

<script>
    console.log("开始下载！")
    const xhr = new XMLHttpRequest();
    xhr.open("GET", "http://121.37.204.235:9990//api/tagging/export/malay?mode=1");
    xhr.responseType = "blob";
    xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWRpZW5jZSI6ImFkbWluX2xsdCIsInN1YnNjcmliZXIiOiJhbGwiLCJyb2xlcyI6IltcInJldHJpZXZlX2FsbF91c2Vyc1wiLFwiUk9MRV9BRE1JTlwiLFwidXNlcl9hdXRob3JpdHlfbW9kaWZpY2F0aW9uXCJdIiwiYWRkaXRpb25hbCI6Int9IiwiaXNzdWVBdCI6IjIwMjEtMDItMjFUMTg6MTY6NTcuNDQzIiwiZXhwaXJhdGlvbiI6IjIwMjEtMDMtMDNUMTg6MTY6NTcuNDQzIiwiaXNzdWVyIjoiTGl5dWFuIn0.vIi8BUdPZvyrwGTTbQzfdX9ABPOolJFJvyyjJ1SePW2o5DGUI0ft2zVCSGqrkpnD7z-a1fEzNoMbEUi1F1MWYCKRwOXZOHlbT6ctxIx0_sGEqZcXZgIq3WVGJ1eqPx3ZQjMdKQxkKyWuqJg8vfqcsKKDr2W0V04Eo_K4swf_q9k");
    xhr.onreadystatechange = function (){
        if(xhr.readyState===4&&xhr.status===200){
            var name = xhr.getResponseHeader("Content_disposition");
            var blob = new Blob([xhr.response],{type:"text/xls"});
            var csvUrl = URL.createObjectURL(blob)
            var link = document.createElement("a");
            link.href = csvUrl
            link.download = name
            link.click()
        }
    }
    xhr.send();
</script>
</body>
</html>